package com.beans;

import java.util.Date;

public class UserBean {
	private String name;
	private String password;
	private String errMessage;
	private Date date;
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getErrMessage() {
		return errMessage;
	}

	public void setErrMessage(String errMessage) {
		this.errMessage = errMessage;
	}
	public String verify(){
		if(!name.equals("wood") ||
		           !password.equals("123456")) {
		            errMessage = "name or password wrong";
		            return "failure";
		        }
		        else {
		            return "success";
		        }

	}
}
